package org.kotboot.dao

import org.apache.ibatis.annotations.Param
import org.apache.ibatis.annotations.Update
import org.kotboot.domain.Address
import tk.mybatis.mapper.common.BaseMapper

interface AddressDao : BaseMapper<Address>{
    fun save(address : Address) : Int
    fun updateSelective(address:Address) : Int
    fun deleteById(address: Address):Int

    fun findByCondition(map:MutableMap<String,Any?>) :MutableList<Address>

    @Update(value = arrayOf("update ms_address set def_ = '0' where userid = #{userid}"))
    fun clearDefault(@Param("userid") userid:Long):Int
}